﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using imaginecup.util;
using Imaginecup.sprite;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace Imaginecup.gameState.ending.unuse
{
    public class SimpleDrawObject
    {
        private EntityInfo m_Info;
        private ISprite m_Sprite;
        private Vector2 m_initPos;

        public void SetEntityInfo(EntityInfo info)
        {
            m_Info = info;
            m_initPos = m_Info.mPosition;
        }


        public void SetSprite(ISprite sprite)
        {
            m_Sprite = sprite;
        }

        public void Draw(SpriteBatch sb)
        {
            m_Sprite.Draw(sb, m_Info);
        }

        public void Release()
        {
            m_Sprite.Release();
        }

        public void SubPositionToInit(Vector2 info)
        {
            m_Info.mPosition.X = m_initPos.X - info.X;
            m_Info.mPosition.Y = m_initPos.Y - info.Y;
        }
    }
}
